package com.bootdo.common.utils;

import java.util.Random;
import java.util.UUID;

public class UuidUtils {

    /**
     * 获得一个UUID
     * @return String UUID
     */
    public static String getUUID(){
        String uuid = UUID.randomUUID().toString();
        //去掉“-”符号
        return uuid.replaceAll("-", "");
    }

    public static String getRandom(){
        return String.format("%04d",new Random().nextInt(9999));
    }

}
